package gamePlay;

import java.io.FileInputStream;
import java.io.IOException;

public class TXTLoader {

	public int[] getStartPosition(String fileName) {

		int[] tPos = new int[2];
		String input = "";
		
		try {
			byte zeichen1;
			FileInputStream leseStrom1 = new FileInputStream(fileName);
			do {
				zeichen1 = (byte) leseStrom1.read();
				input += (char) zeichen1;
			} while (zeichen1 != -1);
			leseStrom1.close();
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		
		tPos[0] = Integer.parseInt(input.substring(0,2))-1;
		tPos[1] = Integer.parseInt(input.substring(2,4))-1;

		return tPos;
	}
}
